package inttest;

/**
 * created by flyketch
 * 19-10-14 上午11:05
 */
public class DoubleTest {

    public static void main(String[] args) {

        String a = "3.6";
        String b = "3.7";

        // a > b 为1， a = b 为0， a < b 为-1。
        int res = Double.valueOf(a).compareTo(Double.valueOf(b));

        System.out.println("compare res is " + res);
        if (res == 1) {
            System.out.println("a > b");
        } else {
            System.out.println("a < b");
        }

        String o = "2.9.1";
        String[] roooo = o.split("\\.");
//        Double o1 = Double.valueOf(o);
        System.out.println(roooo.length);
    }
}
